Use `next` instead of `return` which exits the enclosing method

Akinori MUSHA 9 年之前
父节点
当前提交
b62bf8637d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/concerns/web_request_concern.rb

+ 1 - 1
app/concerns/web_request_concern.rb

@@ -44,7 +44,7 @@ module WebRequestConcern
44 44
             encoding = @default_encoding
45 45
           else
46 46
             # Never try to transcode a binary content
47
-            return
47
+            next
48 48
           end
49 49
         end
50 50
         body.encode!(Encoding::UTF_8, encoding) unless body.encoding == Encoding::UTF_8